home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 June / PCpro_2006_06.ISO / files / freeware / openvip.exe / {app} / globals.py < prev    next >
Encoding:
Python Source  |  2003-06-03  |  749 b   |  28 lines

  1. #
  2. # This file is part of OpenVIP (http://openvip.sourceforge.net)
  3. #
  4. # Copyright (C) 2002-2003
  5. # Michal Dvorak, Jiri Sedlar, Antonin Slavik, Vaclav Slavik, Jozef Smizansky
  6. #
  7. # This program is licensed under GNU General Public License version 2;
  8. # see file COPYING in the top level directory for details.
  9. #
  10. # $Id: globals.py,v 1.4 2003/06/03 11:00:37 vaclavslavik Exp $
  11. #
  12. # Global variables
  13. #
  14.  
  15. import openvip, worker
  16.  
  17. # OpenVIP library handle:
  18. core = openvip.Library()
  19.  
  20. # openvip.FileInfo objects for all already scanned files:
  21. fileinfo = {}
  22.  
  23. def get_file_info(filename):
  24.     """Returns openvip.FileInfo object for given file."""
  25.     if filename not in fileinfo:
  26.         fileinfo[filename] = core.get_file_info(filename)
  27.     return fileinfo[filename]
  28.